#ifndef LOGIN_H
#define LOGIN_H

#include <QDialog>
#include <QMouseEvent>
#include <QTimer>
#include"tcpclient.h"
#include<QVector>
namespace Ui {
class login;
}


struct Body{
    Body(QString key1,QString value1):key(key1),value(value1){

    }
    QString key;
    QString value;
};

class login : public QDialog
{
    Q_OBJECT

public:
    explicit login(QWidget *parent = nullptr);
    ~login();
protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
private slots:
    void on_pushButton_clicked();

    void on_register_2_clicked();

    void on_login_2_clicked();

    void on_pushButton_2_clicked();

private:
    Ui::login *ui;
    QPoint last;  //保存坐标点
    tcpclient* client;
    QTimer *timer;
    QString nameid;
    QString passwd;
};
void parseData(QString response, QVector<Body>&arrbody, QByteArray& finalData);
#endif // LOGIN_H
